package com.docking.heylo.utils;

import com.docking.heylo.ThreadContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Service;

@Service
public class HeyloMessageSource {

    @Autowired
    private MessageSource messageSource;

    public HeyloMessageSource(MessageSource messageSource) {
        this.messageSource = messageSource;
    }

    public String getMessage(String code){
        return messageSource.getMessage(code, null, ThreadContext.locale());
    }



}
